package com.deepocean.controller;

import com.deepocean.common.entity.ResultEntity;
import com.deepocean.entity.CentrifugeCondition;
import com.deepocean.entity.CentrifugeEntity;
import com.deepocean.entity.DeslimingScreenCondition;
import com.deepocean.entity.DeslimingScreenEntity;
import com.deepocean.service.IDeslimingScreenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 脱泥筛
 */
@RestController
@RequestMapping("/deslimingScreen")
public class DeslimingScreenController {
    @Autowired
    private IDeslimingScreenService deslimingScreenService;

    /**
     * 新增接口
     * @param deslimingScreenEntity
     * @return
     */
    @PostMapping("/v1/add")
    public ResultEntity add(@RequestBody DeslimingScreenEntity deslimingScreenEntity) {
        return ResultEntity.success(deslimingScreenService.add(deslimingScreenEntity));
    }

    /**
     * 一小时内物料输入输出总和
     * @param deviceId
     * @return
     */
    @PostMapping("/v1/getInAndOutInHour")
    public ResultEntity getInAndOutInHour(@RequestParam String deviceId) {
        return ResultEntity.success(deslimingScreenService.getInAndOutInHour(deviceId));
    }

    /**
     * 条件查询
     * @param deslimingScreenCondition
     * @return
     */
    @PostMapping("/v1/getDeslimingScreenByCondition")
    public ResultEntity getDeslimingScreenByCondition(@RequestBody DeslimingScreenCondition deslimingScreenCondition) {
        return ResultEntity.success(deslimingScreenService.getDeslimingScreenByCondition(deslimingScreenCondition));
    }

    /**
     * 根据设备型号获取理论数据
     * @return
     */
    @PostMapping("/v1/getTheoryData")
    public ResultEntity getTheoryData(String deviceType) {
        return ResultEntity.success("理论数据");
    }

}
